import React from 'react';
import { useInRouterContext, useNavigate } from "react-router-dom";

export const ErrorPage = () => {
    const navigate = useNavigate();
    return <div style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
        <div>
            <div>404 Not Found</div>
            <div>找不到页面对应的内容</div>
            <div onClick={() => navigate('/')}>返回主页</div>
            <div onClick={() => navigate(-1)}>返回上一页</div>
        </div>
    </div>;
};